Switch "CPU instruction set" to document encoding instead #511
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #456.
As mentioned there, optables provides a very compact view of instructions, but may not help discerning patterns; whereas gbz80(7) describes the instructions themselves, but does not work well as a cheat sheet.
This PR attempts to document what neither of those two resources do: the instructions' encoding, in a manner closer to how the CPU decodes them. The patterns can be gleaned from optables, especially in the octal view, but not everyone may connect the dots.
Cycle counts, behaviour descriptions, etc. have been removed, since that information can be found in gbz80(7) and optables; and removing that data makes this page more compact, and thus I think easier to navigate and grasp.
Instructions have been grouped thematically, and those groups roughly ordered—though blocks 0 and 3 are quite resistant to any consensus ordering.
Anyone and everyone is welcome to share their feedback on the decisions made about the content and the presentation. Thank you!